import { lazy } from "react"

// import { Navigate } from "react-router-dom";
import { AuthComponent } from '../../components/suspense/index'

var Systemindex = lazy(() => import("./errouter/Systemindex"))
var Mine_Message = lazy(() => import("./errouter/Mine_Message"))

var OrderForm = lazy(() => import("./threerouter/OrderForm"))
var MarketForm = lazy(() => import("./threerouter/MarketForm"))
var FinanceForm = lazy(() => import("./threerouter/FinanceForm"))




var Notfound = lazy(() => import('../../components/Notfound'))

export default [ //Goods模块的二级路由
    {//*系统首页
        path: '/index/systemindex',
        element: <AuthComponent permission={1}>  <Systemindex />  </AuthComponent>
    },
    {//*个人信息
        path: '/index/mine_message',
        element: <AuthComponent permission={1}>  <Mine_Message />  </AuthComponent>
    },
    {//*数据报表 - 订单报表
        path: '/index/orderform',
        element: <AuthComponent permission={2}>  <OrderForm />  </AuthComponent>,
    },
    {//*数据报表 - 销售报表
        path: '/index/marketform',
        element: <AuthComponent permission={2}>  <MarketForm />  </AuthComponent>,
    },
    {//*数据报表 - 财务报表
        path: '/index/financeform',
        element: <AuthComponent permission={2}>  <FinanceForm />  </AuthComponent>,
    },
    {
        path: '*',
        element: <Notfound />
    },
]